/*
============================================================================
 Name        : BlockContacterList.h
 Author      : 
 Version     :
 Copyright   : Your copyright notice
 Description : CBlockContacterList declaration
============================================================================
*/

#ifndef BLOCKCONTACTERLIST_H
#define BLOCKCONTACTERLIST_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include "Block.h"
#include <dial.h>
// CLASS DECLARATION
class TContacter
{
public:
	TContacter(){iSelected = EFalse;};

	TContacter(const TDesC& aPhone,TBool bSel)
	{
		iPhone.Copy(aPhone);
		iSelected = bSel;
	}
	~TContacter(){};
public:
	TBuf<64> iName;
	TPhoneNumber	iPhone;
	TBool	 iSelected;
};
/**
*  CBlockContacterList
* 
*/
class CBlockContacterList : public CBlock
{
public:
	~CBlockContacterList();

	static CBlockContacterList* NewL(CBaseBlock* bsBack);

	static CBlockContacterList* NewLC(CBaseBlock* bsBack);

	CBlockContacterList(CBaseBlock* bsBack);
	
public:
	//from CBlock
	void OnDraw(CFbsBitGc& g)const;

	void OnKeyDown(TInt keyCode);

	void ChangeScrollPos(TInt nPos);

	void InitPopMenu(const TInt& nType);

	TBool OnMenuEvent(TInt menuId);
	
	void OnMouseUp(const TPoint& aPt);
	
	void SizeChanged();
	
protected:
	void BeforeDraw(CFbsBitGc& g) const;
	
private:

	void ConstructL();

	void InitCntList();
private:
	RArray<TContacter> m_vContacters;
	TInt m_nCurrent;
};

#endif // BLOCKCONTACTERLIST_H
